package com.gordon.wiki.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gordon.wiki.mapper.EbookSnapshotMapper;
import com.gordon.wiki.pojo.EbookSnapshot;
import com.gordon.wiki.resp.StatisticResp;
import com.gordon.wiki.service.EbookSnapshotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Projectname: wiki
 * @Filename: EbookSnapshotServiceImpl
 * @Author: GordonLo
 * @Data:2022/11/22 15:36
 * @Description: TODO
 */
@Service
public class EbookSnapshotServiceImpl extends ServiceImpl<EbookSnapshotMapper, EbookSnapshot> implements EbookSnapshotService {

    @Autowired
    private EbookSnapshotMapper ebookSnapshotMapper;

    @Override
    public void genSnapShot() {
        ebookSnapshotMapper.genSnapShot();
    }

    @Override
    public List<StatisticResp> getStatistic() {
        return ebookSnapshotMapper.getStatistic();
    }

    @Override
    public List<StatisticResp> get30Statistic() {
        return ebookSnapshotMapper.get30Statistic();
    }
}